#-*- codeing = utf-8 -*-
#@Time : 2020/9/18 12:39
#@Author : 阳某
#@File : 编码.py
#@Software : PyCharm

import sys
import io
# 1
sys.stdout = io.BufferedRWPair(sys.stdout.buffer,encoding = 'gb18030')  #更改了print函数的内置标准输出的编码
import requests
url = ''
response = requests.get(url)
# 2
response.encoding = 'utf-8'
# 3
response.encoding = response.apparent_encoding
# 4
response.content.decode('utf-8')